Skip to content

Use UTC for testing timestamps passed to git #4580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented May 16, 2025

Suddenly my macos git complains that:

stderr: fatal: invalid date format: 1970-01-01T00:00:00.000

Not sure why that is, and when it stopped working (most of the time I develop on linux). Mac CI seems to be running fine.

But disregarding that utc time seems to be the right thing here.

For reference:

main() {
  print(DateTime(1970).toIso8601String());
  print(DateTime.utc(1970).toIso8601String());
}

prints

1970-01-01T00:00:00.000
1970-01-01T00:00:00.000Z

The last one makes git happy on my mac.

@sigurdm sigurdm requested review from jonasfj and szakarias May 16, 2025 10:33
@sigurdm sigurdm merged commit 141f46e into dart-lang:master May 16, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants